package com.ruoyi.supplier.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.supplier.mapper.TbOrderDetailMapper;
import com.ruoyi.supplier.domain.TbOrderDetail;
import com.ruoyi.supplier.service.ITbOrderDetailService;

/**
 * 订单明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-02-16
 */
@Service
public class TbOrderDetailServiceImpl implements ITbOrderDetailService 
{
    @Autowired
    private TbOrderDetailMapper tbOrderDetailMapper;

    /**
     * 查询订单明细
     * 
     * @param id 订单明细ID
     * @return 订单明细
     */
    @Override
    public TbOrderDetail selectTbOrderDetailById(Long id)
    {
        return tbOrderDetailMapper.selectTbOrderDetailById(id);
    }

    /**
     * 查询订单明细列表
     * 
     * @param tbOrderDetail 订单明细
     * @return 订单明细
     */
    @Override
    public List<TbOrderDetail> selectTbOrderDetailList(TbOrderDetail tbOrderDetail)
    {
        return tbOrderDetailMapper.selectTbOrderDetailList(tbOrderDetail);
    }

    /**
     * 新增订单明细
     * 
     * @param tbOrderDetail 订单明细
     * @return 结果
     */
    @Override
    public int insertTbOrderDetail(TbOrderDetail tbOrderDetail)
    {
        return tbOrderDetailMapper.insertTbOrderDetail(tbOrderDetail);
    }

    /**
     * 修改订单明细
     * 
     * @param tbOrderDetail 订单明细
     * @return 结果
     */
    @Override
    public int updateTbOrderDetail(TbOrderDetail tbOrderDetail)
    {
        return tbOrderDetailMapper.updateTbOrderDetail(tbOrderDetail);
    }

    /**
     * 批量删除订单明细
     * 
     * @param ids 需要删除的订单明细ID
     * @return 结果
     */
    @Override
    public int deleteTbOrderDetailByIds(Long[] ids)
    {
        return tbOrderDetailMapper.deleteTbOrderDetailByIds(ids);
    }

    /**
     * 删除订单明细信息
     * 
     * @param id 订单明细ID
     * @return 结果
     */
    @Override
    public int deleteTbOrderDetailById(Long id)
    {
        return tbOrderDetailMapper.deleteTbOrderDetailById(id);
    }
}
